#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QMessageBox>
#include <QDebug>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
}

MainWindow::~MainWindow()
{
    delete ui;
}


void MainWindow::on_pushButton_clicked()
{
    int result  =  QMessageBox::information(this,"这是标题","这是文本对话框",QMessageBox::Ok|QMessageBox::No);
    if(result==QMessageBox::Ok)
        qDebug()<<"Ok";
    else if(result==QMessageBox::No)
        qDebug()<<"No";
}
